﻿Imports System.ComponentModel.Composition
Imports System.Windows.Controls

<ContractType(MetadataViewType:=GetType(IWpfServiceMetadata))> _
Public Interface IWpfService
    ' Gets the custom control to display in the host preferences dialog.
    ReadOnly Property OptionsUserControl() As UserControl

    ReadOnly Property Name() As String
    ReadOnly Property TrayIcon() As System.Drawing.Icon
    ReadOnly Property Description() As String
    ReadOnly Property Author() As String
    ReadOnly Property Version() As Version
    ReadOnly Property AuthorUri() As Uri
    ReadOnly Property HideOnClose() As Boolean
    Property Status() As String

    Sub Initialize()
    Sub Start()
    Sub [Stop]()

    Event StatusUpdated As EventHandler

End Interface

Public Interface IWpfServiceMetadata
    ReadOnly Property ServiceName() As String
End Interface

<MetadataAttribute()> _
Public NotInheritable Class WpfServiceAttribute
    Inherits Attribute

    Private _ServiceName As String

    Public Property ServiceName() As String
        Get
            Return _ServiceName
        End Get
        Private Set(ByVal value As String)
            _ServiceName = value
        End Set
    End Property

    Public Sub New(ByVal ServiceName As String)
        Me._ServiceName = ServiceName

    End Sub
End Class